package van.planifolia.strategy;

/**
 * Created by Intellij IDEA<br>
 *
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/11/10 17:43
 */
public class Test {
    public static void main(String[] args) {
        // 创建客户端对象
        JDClick jdClick = new JDClick();
        // 设置打折策略
        jdClick.setDiscount(new Discount618());
        // 购买商品
        jdClick.buy(1888);
        jdClick.setDiscount(new Discount1111());
        jdClick.buy(1888);
    }
}
